package com.wwdx.controller.admin;

import com.wwdx.model.upms.UpmsLog;
import com.wwdx.service.upms.UpmsLogServiceI;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

/**
 * @author liguoliang
 * @date 2018/3/5 10:23
 */
@Controller
@RequestMapping("/system/upms_log")
public class UpmsLogController {
    
    @Resource
    private UpmsLogServiceI upmsLogService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    public ModelAndView list(UpmsLog model,
                             @RequestParam(value = "page", defaultValue = "1") int page,
                             @RequestParam(value = "rows",defaultValue = "10") int rows) {

        ModelAndView mav = new ModelAndView();
        mav.addObject("listSize",  upmsLogService.selectModelCount(model));
        mav.addObject("list",  upmsLogService.selectModelList(model,page,rows));
        return mav;
    }
}